Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@material/checkbox

Package Overview
Dependencies
Maintainers
13
Versions
1705
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/checkbox

The Material Components for the web checkbox component

  • 2.3.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
13
Created

What is @material/checkbox?

@material/checkbox is a Material Design implementation of a checkbox component. It provides a customizable and accessible checkbox that can be used in web applications to allow users to make binary choices.

What are @material/checkbox's main functionalities?

Basic Checkbox

This code demonstrates how to initialize a basic Material Design checkbox using the @material/checkbox package.

import {MDCCheckbox} from '@material/checkbox';

const checkbox = new MDCCheckbox(document.querySelector('.mdc-checkbox'));

Indeterminate State

This code shows how to set a checkbox to an indeterminate state, which is useful for indicating a mixed selection.

import {MDCCheckbox} from '@material/checkbox';

const checkbox = new MDCCheckbox(document.querySelector('.mdc-checkbox'));
checkbox.indeterminate = true;

Handling Change Events

This code demonstrates how to listen for change events on the checkbox and handle them accordingly.

import {MDCCheckbox} from '@material/checkbox';

const checkbox = new MDCCheckbox(document.querySelector('.mdc-checkbox'));
checkbox.listen('change', () => {
  console.log('Checkbox state changed to: ', checkbox.checked);
});

Other packages similar to @material/checkbox

Keywords

FAQs

Package last updated on 28 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc